package com.example.qt.ptplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("torrents")
public class Torrent {

    @TableId(value = "torrent_id", type = IdType.AUTO)  // 确保是 torrent_id
    private Integer torrentId;

    private Integer userId;
    private String title;
    private String description;
    private String tags;
    private String category;
    private LocalDateTime uploadTime;
    @TableField("sizeGB")
    private Double sizeGB;//资源大小
    private Boolean isPromo;  // 新增字段 is_promo
    private String realFilename;  // 存储上传的真实文件名
    @TableField("cover_image")
    private byte[] coverImage;  // 用于存储封面图片的二进制数据
}
